Skip to content

[BUGFIX] Avoid unsafe array access to colPos#150

Open
smichaelsen wants to merge 1 commit intoIchHabRecht:mainfrom
smichaelsen:patch-1
Open

[BUGFIX] Avoid unsafe array access to colPos#150
smichaelsen wants to merge 1 commit intoIchHabRecht:mainfrom
smichaelsen:patch-1

Conversation

@smichaelsen
Copy link
Copy Markdown

When content elements are created as inline records (for example in news) they usually don't come with a colPos. This results in a fatal error with PHP 8.

When content elements are created as inline records (for example in news) they usually don't come with a colPos. This results in a fatal error with PHP 8.
@IchHabRecht
Copy link
Copy Markdown
Owner

Hi @smichaelsen,

Please see my comment on #143. I still think it's wrong to fall back to colpos 0 as there might be some configuration which gets applied here. There needs to be a check for some whitelist items according to some value from the request and return early without any content_defender interaction.

@smichaelsen
Copy link
Copy Markdown
Author

You mean an early return in the content_defender hook class if some crucial fields are not provided? I can change my PR in that direction, if you want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants